home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
ptoolwi3.arc
/
PTOOLWI3.DOC
next >
Wrap
Text File
|
1986-11-03
|
7KB
|
138 lines
PTOOLWI3.INC Copyright 1984 R D Ostrander Version 3.0
Ostrander Data Services of
5437 Honey Manor Dr PTOOLWIN.INC
Indianapolis IN 46241
These Turbo Pascal procedures are text window manipulation tools used to ease
the manipulation of Windows in an IBM PC environment. They are used to open
and close windows while saving the data covered by the window. Borders around
windows are also supported.
This program has been placed in the Public Domain by the author and copies
may be freely made for non-commercial, demonstration, or evaluation purposes.
Use of these subroutines in a program for sale or for commercial purposes in
a place of business requires a $20 fee be paid to the author at the address
above. Personal non-commercial users may also elect to pay the $20 fee to
encourage further development of this and similar programs. With payment you
will be able to receive update notices, diskettes and printed documentation
of this and other PTOOLs from Ostrander Data Services.
PTOOL, and PTOOLxxx are Copyright Trademarks of Ostrander Data Services
Turbo Pascal is a Copyright of Borland International Inc.
Version 2.0 of PTOOLWIN (aka PTOOLWI2) supports stack operations for holding
screen image data. Each screen opened absorbs 4006 bytes of Heap/Stack while
it is open for the storage of the image on the screen before the new screen
was opened. This area is freed up when the window is closed. No checks are
made within PTOOLWIN to ensure that there is sufficient space on the
Heap/Stack for PTOOLWIN to execute properly. The calling program must do this
via a MaxAvail call such as
If MaxAvail < 0 or MaxAvail > 4006 then PTWOpen (1)
else (((((ERROR ROUTINE)))));
Version 3.0 of PTOOLWIN (aka PTOOLWI3) automatically determine whether a
Color/Graphics or a Monochrome display card are active and sets the output
accordingly IF PTOOLWIN_Screen_Type IS AN 'X' WHEN PTWSET is first called.
This variable still has all the functionality in Version 1.0 and 2.0 - if
PTOOLWIN_Screen_Type is set to a 'C' or 'M' by the calling program, it will
take precedence and the switching of screens can still be done this way.
Version 3.0 was developed by LEW PAPER of St. Paul MN using the
card routine "WINDOW.PAS" developed by BELA LUBKIN of Borland.
Thanks to both of these people by the original author. A good
example of User Supported Software at work.
RDO.
Procedures available in PTOOLWIN.INC are:
PTWSet (Screen#, X1, Y1, X2, Y2, - Sets up window coordinates so that later
BorderSwitch, references can be made by Mnemonic only.
BackgroundColor, PTWSet must be done once for each window
ForegroundColor) before it is Opened.
The Screen# is a number between 1 and
the maximum number of windows allowable
set in the Constants Block below.
The X and Y Coordinates are the same as
for the Turbo Pascal Window procedure.
A border may be placed around the window
and the size of the window will be
decreased to fit inside the border. The
BorderSwitch functions are:
0 - No border
1 - Single line block graphics border
2 - Double line block graphics border
-1 - Single line Reversed color border
-2 - Double line Reversed color border
The BackgroundColor and ForegroundColor
parameters are the same as for the Turbo
Pascal TextColor and TextBackground
procedures.
PTWOpen (Screen#) - Activates a window (previously set by
PTWSet) and saves the screen covered by
the window.
In the Constants Block following, there
is a parameter that sets the maximum
number of windows that may be open at
any one time.
PTWClose - De-activates the open window, activates
the previous window and restores the
screen covered by the closed window.
Note that the PTWOpen & PTWClose have a
"Push/Pop" type of action.
Constants in the PTOOLWIN.INC file that must be set by the programmer before
compilation are:
PTOOLWIN_Number_of_Windows = nn;
This determines the number of windows that may be set with the
PTWSet procedure. This is easily determined when the calling
program is designed.
It also determines the number of windows that may be open at any one
time.
Use the largest of the two figures that you expect.
There is a constant that must be set before the PTWOpen or PTWClose procedures
are called:
PTOOLWIN_Screen_Type : Char = 'C';
If the final program is going to be run on an IBM PC with a Monochrome
video card then this parameter must be set to 'M'. If the PC has
a Color/Graphics card then it must be set to 'C'. This setting may be
done at run time rather than at compile time since the difference that
this parameter makes is whether to store and recall the screen data at
$B8000 (Color Graphics) or $B0000 (Monochrome) via the absolute
variables :
PTOOLWIN_C_Screen : Char absolute $B800:$0000;
PTOOLWIN_M_Screen : Char absolute $B000:$0000;
This may be found in the calling program by using either the
PTEMonoAttached or PTEColorAttached functions found in the PTOOLENV
Environment control.
Now go out and try PTOOLWIN and by all means, look at the code of both
PTOOLWIN.PAS and PTOOLWIN.INC to completely understand how to incorporate
the Ostrander Data Services product into your programs.
Write to find out about other ODS software available that might not be
on this bulletin board.